1. Field of the Invention
The present invention relates to a flash memory such as a flash EEPROM (electrically erasable programmable read only memory) for recording nonvolatile data.
2. Description of Related Art
A built-in system such as a mobile phone today employs a random access flash memory for storing programs of the system, an EEPROM for recording frequently rewritten data and a rather small amount of nonvolatile data, and a serial write flash memory or an SRAM (static random access memory) with a backup power supply for recording a large amount of data.
The EEPROM, which requires a greater number of memory elements per bit than the flash memory, demands a higher cost per bit. The SRAM with a backup power supply also raises the cost because of the backup power supply. Thus, recording the data, which is stored separately in these memories, into the flash memory has an advantage of being able to reduce the packaging area and cost of the device.
A conventional flash memory in a built-in system cannot read a system program while writing another system program. In addition the conventional flash memory writes the system program using a special processing. Recently, however, a flash memory (referred to as a BGO (background operation) flash memory from now on) has emerged which can read data from an area of the memory while writing data to another area. This makes it possible to integrate the flash memory for storing data into the flash memory for storing the program.
As an example that stores data in a flash memory, Japanese patent publication No. 7-50558/1995 disclose a semiconductor disk as shown in FIG. 14.
This system employs a flash memory 4 as a semiconductor disk, and comprises a controller 1, a RAM 2, a bus controller 3 and an internal bus 5 for controlling the semiconductor disk. The flash memory 4, however, has a restriction that the EEPROM or SRAM does not have.
The restriction is that the flash memory 4 can write data only in a unidirectional manner either from 0 to 1, or from 1 to 0. Thus, to rewrite an area that is already written, the entire block, including that area, must be erased before writing data so that 0s or 1s are written throughout the block. This makes it difficult for the conventional flash memory to write on a byte by byte basis as in the EEPROM or SRAM.
With the foregoing structure, the conventional flash memory can rewrite data to a written area if the entire block, including that area, is erased. The number of erasable times of the flash memory, however, is about one tenth of that of the EEPROM, which makes it difficult to record frequently rewritten data.